package com.crack.nga2.volley;

import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.Request;
import com.android.volley.Response;
import com.crack.nga2.entity.Task;
import com.crack.nga2.utils.GlobalConst;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 获取任务
 * Created by Administrator on 2016/1/6.
 */
public class TaskRequest extends Request<Task> {
    private Response.Listener<List<Task>> listener;

    public TaskRequest(int method, String url, Response.Listener<List<Task>> listener, Response.ErrorListener errorListener) {
        super(method, url, errorListener);
        this.listener = listener;
    }

    @Override
    public Map<String, String> getHeaders() throws AuthFailureError {
        Map<String, String> headFields = new HashMap<>();
        headFields.put("Cookie", GlobalConst.Cookie);
        return headFields;
    }

    @Override
    protected Response<Task> parseNetworkResponse(NetworkResponse response) {
        return null;
    }

    @Override
    protected void deliverResponse(Task response) {

    }
}
